package com.example.backgroundservice.controller;


import com.example.backgroundservice.service.IStudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author cc
 * @since 2022-06-09
 */
@RestController
@RequestMapping("/student")
public class StudentController {

    @Autowired
    private IStudentService studentService;

    @PostMapping("/add")
    public String add(String students){
        return studentService.add(students);
    }

    @GetMapping("/init")
    public String init(){
        return studentService.init();
    }

    @GetMapping("/background/student")
    public String getStudent(){
        return "student";
    }

    @GetMapping("/background/person")
    public String getPerson(){
        return "person";
    }
}
